<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingOne">
      <h5 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">基本参数</a>
      </h5>
    </div>

      <div class="panel-body">
        <input type="hidden" name="reply_id" value="{$reply['id']}" />
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动标题</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['title']}" class="span2" name="title">
            <div class="help-block">活动的标题</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">缩略图</label>
          <div class="col-sm-9">
            {php echo tpl_form_field_image('thumb',$reply['thumb'],'', $options);}
            <div class="help-block">图文消息的缩略图</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动简介</label>
          <div class="col-sm-9">
            <textarea class="form-control" name="description">{$reply['description']}</textarea>
            <div class="help-block">图文消息的简介</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动时间</label>
          <div class="col-sm-4">
            {php echo tpl_form_field_daterange('time', array('start'=>date('Y-m-d H:i:s',$reply['starttime']),'end'=>date('Y-m-d H:i:s',$reply['endtime'])), true)}
            <div class="help-block">输入活动的起止时间</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动状态</label>
          <div class="col-sm-2">
             <label><input type="radio" value="1" name="status" {if $reply['status'] == 1 }checked{/if}>正常</label>
			 <label><input type="radio" value="0" name="status" {if $reply['status'] == 0 }checked{/if}>禁用</label>
          </div>
        </div>
      </div>

  </div>
  <div class="panel panel-default">
      <div class="panel-heading" role="tab" id="headingOne">
      <h5 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">活动设置</a>
      </h5>
    </div>

      <div class="panel-body">

        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否关注</label>
          <div class="col-sm-6">
             <label><input type="radio" value="0" name="isfollow" {if $reply['isfollow'] == 0 }checked{/if}>不需要关注     </label>
             <label><input type="radio" value="1" name="isfollow" {if $reply['isfollow'] == 1 }checked{/if}>参加需关注     </label>
			 <label><input type="radio" value="2" name="isfollow" {if $reply['isfollow'] == 2 }checked{/if}>参加，投票需关注</label>
          </div>

		  
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">模式</label>
          <div class="col-sm-6">
             <label><input type="radio" value="0" name="diamondmodel" {if $reply['diamondmodel'] == 0 }checked{/if}>钻石模式     </label>
             <label><input type="radio" value="1" name="diamondmodel" {if $reply['diamondmodel'] == 1 }checked{/if}>钻石，鸡蛋模式     </label>
			 <label><input type="radio" value="2" name="diamondmodel" {if $reply['diamondmodel'] == 2 }checked{/if}>普通投票模式     </label>
			 <div class="help-block">根据情况不同的投票需求，选择不同的模式。</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">钻石抵票数</label>
          <div class="col-sm-9"> 
            <input class="form-control" type="text" value="{$reply['exchange']}" class="span2" name="exchange">
			<div class="help-block">一颗钻石抵多少票数，请填正整数。</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">鸡蛋减票数</label>
          <div class="col-sm-9"> 
            <input class="form-control" type="text" value="{$reply['jdexchange']}" class="span2" name="jdexchange">
			<div class="help-block">一颗鸡蛋减多少票数，请填正整数。</div>
          </div>
        </div>

		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否审核</label>
          <div class="col-sm-6">
             <label><input type="radio" value="0" name="ischecked" {if $reply['ischecked'] == 0 }checked{/if}>否    </label>
             <label><input type="radio" value="1" name="ischecked" {if $reply['ischecked'] == 1 }checked{/if}>是    </label>
			 <div class="help-block">选择“是”时，审核过后才能显示（自己参与的投票可见）和投票。</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">每人每日每用户</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['everyoneuser']}" class="span2" name="everyoneuser">
			<div class="help-block">每人每天最多给每个用户投多少票。(钻石投票不受影响:-D)</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">每日每人</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['dailyvote']}" class="span2" name="dailyvote">
			<div class="help-block">每人每天最多投多少票，当天给所有人投票的总数。(钻石投票不受影响:-D)</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">每人最多</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['everyonevote']}" class="span2" name="everyonevote">
			<div class="help-block">每人最多投票总数。(钻石投票不受影响:-D)</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">地区限制</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['area']}" class="span2" name="area">
            <div class="help-block">请填写开发活动地区城市，例如：北京,上海,广州,海口。为空则不限制地区。多个地区用“,”分割。
			{if $baiduapikey==""}
			<div class="alert alert-danger" role="alert">正确设置百度api市场apikey才能正常使用地区限制，<a href="{php echo url('profile/module/setting', array('m' => 'tyzm_pintu'));}" target="_blank" >点击设置</a>。</div>
			{/if}
			
			</div>
          </div>
        </div>
		<div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">排行榜数量</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['rankingnum']}" class="span2" name="rankingnum">
			<div class="help-block">设置最大显示排行榜数量</div>
          </div>
        </div>
	    <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">未关注引导提示</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['followguide']}" class="span2" name="followguide">
			<div class="help-block">设置关注投票或参加时，未关注用户可见。</div>
          </div>
        </div>
	  </div>
</div>
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingTwo">
      <h5 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">投票设置</a>
      </h5>
    </div>

      <div class="panel-body">
	    <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>头部图片</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('topimg',$reply['topimg']);}
				<div class="help-block">投票主题图</div>
            </div>
        </div>
	    <!--div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">背景色</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_color('bgcolor', $reply['bgcolor'])}
				<div class="help-block">全局背景颜色</div>
            </div>
        </div-->
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label">活动介绍</label>
			<div class="col-sm-8">
				<textarea id="infomsg" name="infomsg" style="height:200px; " class="form-control richtext" cols="70" rows="100">{$reply['infomsg']}</textarea>				
				<div class="help-block">活动详细说明</div>
			</div>
		</div>
		 <div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label">活动规则</label>
			<div class="col-sm-8">
				<textarea id="eventrule" name="eventrule" style="height:200px; " class="form-control richtext" cols="70" rows="100">{$reply['eventrule']}</textarea>				
				<div class="help-block">活动规则详细说明</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label">奖品介绍</label>
			<div class="col-sm-8">
				<textarea name="awardmsg" id="awardmsg" style="height:200px; " class="form-control richtext" cols="70" rows="100">{$reply['awardmsg']}</textarea>				
				<div class="help-block">活动详细介绍，可上传图片</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label">奖品简介</label>
			<div class="col-sm-8">
				<textarea name="prizemsg" id="prizemsg" style="height:200px; " class="form-control richtext" cols="70" rows="100">{$reply['prizemsg']}</textarea>				
				<div class="help-block">活动简单介绍</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label">活动结束</label>
			<div class="col-sm-8">
				<textarea name="endintro" id="endintro" style="height:200px; " class="form-control richtext" cols="70" rows="100">{$reply['endintro']}</textarea>				
				<div class="help-block">活动结束说明</div>
			</div>
		</div>
      </div>

  </div>
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingThree">
      <h5 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">分享信息</a>
      </h5>
    </div>

      <div class="panel-body">
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
          <div class="col-sm-9">
            <input class="form-control" type="text" value="{$reply['sharetitle']}" class="span2" name="sharetitle">
            <div class="help-block">分享给好友或朋友圈时的标题</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
          <div class="col-sm-9">
            {php echo tpl_form_field_image('shareimg',$reply['shareimg'],'', $options);}
            <div class="help-block">分享给好友或朋友圈时的图片</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享描述</label>
          <div class="col-sm-9">
            <textarea class="form-control" name="sharedesc">{$reply['sharedesc']}</textarea>
            <div class="help-block">分享给好友或朋友圈时的描述</div>
          </div>
        </div>
      </div>

  </div>
</div>

<script>
  window.initReplyController = function($scope) {
    
  };
  window.validateReplyForm = function(form, $, _, util, $scope) {
    
    return true;
  };
</script>
<script>
require(['jquery','util'], function($, util){
	$(function(){
		var editor1 = util.editor($('#infomsg')[0]);
		var editor2 = util.editor($('#eventrule')[0]);
		var editor3= util.editor($('#awardmsg')[0]);
		var editor4 = util.editor($('#prizemsg')[0]);
		var editor5 = util.editor($('#endintro')[0]);
		

	});
});
</script>